import request from '@/utils/request'
// 获取基础数据
export function getLsit(data) {
  return request({
    url: '/role/list',
    method: 'post',
    data
  })
}
//删除数据
export function delData(id) {
    return request({
      url: `/role/del/${id}`,
      method: 'delete'
    })
  }

  // 编辑发送请求
export function editRole(data) {
    return request({
      url: '/role/update',
      method:'put',
      data
    })
  }
  export function addRole(data) {
    return request({
      url: '/role/save',
      method: 'put',
      data
    })
  }

  //编辑数据----回显数据
export function getRoletDeatil(id) {
    return request({
      url: `/role/getById/${id}`,
    })
  }